﻿@model DiaryModel

@{
    ViewBag.Title = "Diary";
}
<table id="calendar">
    <tr>
        <th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>Sat</th><th>Sun</th>
    </tr>
@foreach (Week week in Model.Calendar.Weeks) {
    <tr>
    @foreach (Day day in week.Days) {
        <td>
            @Html.CreateDay(day, Model.Today, Html.ActionLink(day.Date.ToString("MM.dd."), "Day", "Hit", new { date = day.Date.ToString(DiaryHelper.DateFormat()) }, null).ToString())
        </td>
    }
    </tr>
}
</table>
<div>
    @Html.ScrollWeeks(Model.Week, (action, weekNumber) => Url.Action(action, new { week = weekNumber }))
</div>